#include <list>
#include <cstdlib>
#include "dinosauria.h"
#include "tyrannosaurusrex.h"
#include "brachiosaurus.h"
#include "diplodocus.h"
#include "sauroposeidon.h"
#include "giganotosaurus.h"

int main() {
	system("chcp 1252 >nul 2>nul");

	TyrannosaurusRex *d1 = new TyrannosaurusRex("Raph", 7000, 14.4, 4.8, 20.1);
	Brachiosaurus *b1 = new Brachiosaurus("Lili", 95000, 23.9, 16, 10);
	Diplodocus *dp = new Diplodocus("Mimi", 48000, 27.8, 5.4, 9.6, 11.5);
	Dinosauria * s1 = new Sauroposeidon("toto", 110000, 34, 17, 12);
	Dinosauria * g1 = new Giganotosaurus("Giga", 45,45,45,45);

	std::list<Dinosauria*> *listDino = new std::list<Dinosauria*>();

	listDino->push_front(dp->cloneOf());
	listDino->push_front(b1->cloneOf());
	listDino->push_front(d1->cloneOf());
	listDino->push_back(s1->cloneOf());

	delete d1;
	delete b1;
	delete dp;
	delete s1;

	std::list<Dinosauria*>::iterator it;

	for (it = listDino->begin(); it != listDino->end(); it++) {
		std::cout << *(*it) << std::endl;
	}

	std::cout<<*g1<<std::endl;

	return 0;
}
